CHAP. Hi] FERMAT'S AND WILSON'S THEOREMS. 69 a single term of a row is =1 (mod p). If this term be rka?rk, replace it by (p-rk)a2rk=-l. Next, if rncfrk='=Flt rna2rz==±=l, then rk+ri=p and one of the rn is replaced by p— rn. Hence we may separate rxa, . . ., rQa into q/2 pairs such that the product of the two of a pair is = =*= 1 (mod p) . Taking a= 1, we get rx . . .ra==±= 1 (mod p). The sign was determined only for the case p a prime (by Gauss' method). A. Cauchy50 derived Wilson's theorem from (1), page 62 above. *Caraffa51 gave a proof of Fermat's theorem. E. Midy52 gave Ivory's33 proof of Fermat's theorem. W. G. Horner53 gave Euler's14 proof of his theorem. G. Libri54 reproduced Euler's proof12 without a reference. Sylvester55 gave the generalized Wilson theorem in the incomplete form that the residue is =*= 1. Th. Schonemann56 proved by use of symmetric functions of the roots that if zn+b1zn~l+. . . =0 is the equation for the pth powers of the roots of xn+alxn~l+ ... =0, where the a's are integers and p is a prime, then bi^af (mod p). If the latter equation is (x— l)n=0, the former is zn - (np+pQ)2Jn~"1 + . . . = 0, and yet is evidently (z — l)n = 0. Hence wp=n (mod p). W. Brennecke57 elaborated one of Gauss'31 suggestions for a proof of the generalized Wilson theorem. For a>2, z2=l (mod 2a) has exactly four incongruent roots, =*=!, =fc(l+2a~1), since one of the factors x=*= 1, of difference 2, must be divisible by 2 and the other by 2a~1. For p an odd prime, let TI, . . ., r» be the positive integers <pa and prime to pa, taking ri = l, r^ = pa—l. For 2^s^fj,— 1, the root x of rax=l (mod pa) is distinct from rlt rf, ra. Thus r2,. . ., r^.i may be paired so that the product of the two of a pair is =1 (mod pa). Hence TV . .rM= -1 (mod pa). This holds also for modulus 2ptt. For a>2, -i, ri...r,=+l (mod2a). Finally, let N = p"Mj where M is divisible by an odd prime, but not by p. Then w=$(M) is even. The integers <N and prime to p are *V,*V+p", r;+2pv . ., ry+ (M-l)p' 0'=!,. . ., M). For a fixed j, we obtain m integers <N and prune to AT. Hence if \N\ denotes the product of all the integers < N and prime to N, For#=py..., \N\=l (mod 3"),..., whence W==l (mod 2V). s°R6sum6 analyt., Turin, 1, 1833, 35. "Elem. di mat. commentati da Volpicelli, Rome, 1836, 1, 89. MDe quelques propri6t<§s dea nombres, Nantes, 1836. "London and Edinb. Phil. Mag., 11, 1837, 456. MM6m. divers savants ac. ac. Institut de France (math.), 5, 1838, 19. "Phil. Mag., 13, 1838, 454 (14, 1839, 47); Coll. Math. Papers, 1, 1904, 39. "Jour, fur Math., 19, 1839, 290; 31, 1846, 288. Cf. J. J. Sylvester, Phil. Mag., (4), 18, 1859, 281. •Mour. fur Math., 19, 1839, 319.